Skip to content

feat(bank): Bank Link wrapper over the native SDKs - #96

Closed
botinc-agent[bot] wants to merge 6 commits into
mainfrom
botinc/run-eac1f537
Closed

botinc-agent[bot] wants to merge 6 commits into
mainfrom
botinc/run-eac1f537

Conversation

@botinc-agent

@botinc-agent botinc-agent Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

React Native apps had no standalone Bank Link entry point, and the Android adapter was written against a shape the native API does not expose: types from the wrong package, fields read off the result instead of its wrapped success / exit values, and enum constants (OPENED) where JavaScript expects the contract's wire names (opened). A declined presentation left the promise unsettled, every payload key native sent reached listeners, and link_id was optional although both bridges send it as null before the id is known.

Solution

  • Both bridges expose presentBankLink, resumeBankLink, handleBankLinkReturn and onBankLinkEvent, mapping native result variants and enum wire names on each platform.
  • A listener receives only that event's allowed fields, so tokens and session credentials are dropped; link_id is required and nullable.
  • A declined presentation rejects the call instead of hanging.
  • The example forwards the launch URL and warm returns to handleBankLinkReturn before resuming; the README unsubscribes in finally.

Verification

  • 78 tests in the three Bank Link suites pass, the full Jest suite passes (293 tests), and typecheck, ESLint and the package build are clean. All six CI checks are green at b1a89fb.
  • A native-gating regression test fails if the Android adapter stops using the native package, the wire names, the wrapped result variants or the declined-presentation check; each condition was reverted locally to confirm the test catches it.
  • The Android adapter was read symbol by symbol against the open native head (e8f3c9b): package me.didit.sdk.features.bank.link, BankLinkResult.Success.success / .Exit.exit, .wire names, and the Boolean from presentBankLink.
  • Not verified: the enabled Android adapter cannot be compiled here (no JDK or Android SDK), so CI compiles the released stand-in; staging connect and renew on devices remain pending.

@botinc-agent
botinc-agent Bot marked this pull request as draft November 22, 2026 10:17
@arosasg arosasg changed the title DID-12138: React Native: Bank Link wrapper over the native SDKs (sdk-react-native) React Native: Bank Link wrapper over the native SDKs Nov 22, 2026
@arosasg
arosasg marked this pull request as ready for review November 23, 2026 00:35
@arosasg arosasg changed the title React Native: Bank Link wrapper over the native SDKs feat(bank): Bank Link wrapper over the native SDKs Nov 23, 2026
@arosasg

arosasg commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Codex review (codex CLI, account codex-5, model gpt-5.6-sol)


💡 Code review

Reviewed commit: b1a89fb

No blocking findings in commit b1a89fb.

Verdict: APPROVE

@arosasg

arosasg commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Superseded by #97, which holds exactly the same files (tree 4062541e3272, no difference from this head) in a single commit whose history follows this repository's privacy gate.

Parked as a draft so it is not merged by mistake; it is closed once #97 merges.

@arosasg

arosasg commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Closing: superseded by #97, which is merged (the same files plus the review fixes, in a history that follows this repository's privacy gate).

@arosasg arosasg closed this Nov 23, 2026
@arosasg
arosasg deleted the botinc/run-eac1f537 branch November 23, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant